import numpy as np

def generate_adversarial_sample(data, epsilon=0.1):
    """
    生成对抗样本
    :param data: 原始数据
    :param epsilon: 扰动范围
    :return: 对抗样本
    """
    return data + epsilon * np.sign(np.random.randn(*data.shape))

# 示例
data = np.random.randn(10)
adversarial_sample = generate_adversarial_sample(data)
print(f"Adversarial sample: {adversarial_sample}")